#! /bin/bash
# 此程序用于版本发布

. ./scripts/shell/common.sh
. ./scripts/shell/golang.sh
. ./scripts/shell/tool.sh

. ./scripts/shell/buildTimes.sh

PRE_HOOK="./scripts/hooks/pre-release.sh"
END_HOOK="./scripts/hooks/end-release.sh"

if [ -f ${PRE_HOOK} ];then
. ${PRE_HOOK}
fi

BUILD_TIMES=${BUILD_TIMES}"(alpha)"

CHANGLOG_PATH=./CHANGELOG

printLong "构建"

. ./scripts/build.sh

if [ -f ${END_HOOK} ];then
. ${END_HOOK}
fi

if [[ "$?" != 0 ]]; then
    exit 1
fi